﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Hydra.UrlMon.Enumerations
{
    [Flags]
    public enum BindFlags : int
    {
        /// <summary>Value that indicates that the moniker should return immediately from IMoniker::BindToStorage or IMoniker::BindToObject. The actual result of the bind to an object or the bind to storage arrives asynchronously. The client is notified through calls to its IBindStatusCallback::OnDataAvailable or IBindStatusCallback::OnObjectAvailable method. If the client does not specify this flag, the bind operation will be synchronous, and the client will not receive any data from the bind operation until the IMoniker::BindToStorage or IMoniker::BindToObject call returns.</summary>
        ASYNCHRONOUS = 0x1,
        /// <summary>Value that indicates the client application calling the IMoniker::BindToStorage method prefers that the storage and stream objects returned in IBindStatusCallback::OnDataAvailable return E_PENDING when they reference data not yet available through their read methods, rather than blocking until the data becomes available. This flag applies only to BINDF_ASYNCHRONOUS operations. Note that asynchronous stream objects return E_PENDING while data is still downloading and return S_FALSE for the end of the file.</summary>
        ASYNCSTORAGE = 0x2,
        /// <summary>Value that indicates that progressive rendering should not be allowed.</summary>
        NOPROGRESSIVERENDERING = 0x4,
        /// <summary>Value that indicates that the moniker should be bound to the cached version of the resource.</summary>
        OFFLINEOPERATION = 0x8,
        /// <summary>Value that indicates the bind operation should retrieve the newest version of the data/object possible. For URL monikers, this flag maps to the WinInet API flag, INTERNET_FLAG_RELOAD, which forces a download of the requested resource.</summary>
        GETNEWESTVERSION = 0x10,
        /// <summary>Value that indicates the bind operation should not store retrieved data in the disk cache. BINDF_PULLDATA must also be specified to turn off the cache file generation when using the IMoniker::BindToStorage method.</summary>
        NOWRITECACHE = 0x20,
        /// <summary>Value that indicates the downloaded resource must be saved in the cache or a local file.</summary>
        NEEDFILE = 0x40,
        /// <summary>Value that indicates the asynchronous moniker allows the client of IMoniker::BindToStorage to drive the bind operation by pulling the data, rather than having the moniker drive the operation by pushing the data to the client. When this flag is specified, new data is only read/downloaded after the client finishes downloading all data that is currently available. This means data is only downloaded for the client after the client does an IStream::Read operation that blocks or returns E_PENDING. When the client specifies this flag, it must be sure to read all the data it can, even data that is not necessarily available yet. When this flag is not specified, the moniker continues downloading data and calls the client with IBindStatusCallback::OnDataAvailable whenever new data is available. This flag applies only to BINDF_ASYNCHRONOUS bind operations.</summary>
        PULLDATA = 0x80,
        /// <summary>Value that indicates that security problems related to bad certificates and redirects between HTTP and Secure Hypertext Transfer Protocol (HTTPS) servers should be ignored. For URL monikers, this flag corresponds to the WinInet API flags API Flags, API Flags, API Flags, and API Flags.</summary>
        IGNORESECURITYPROBLEM = 0x100,
        /// <summary>Value that indicates the resource should be resynchronized. For URL monikers, this flag maps to the WinInet API flag, INTERNET_FLAG_RESYNCHRONIZE, which reloads an HTTP resource if the resource has been modified since the last time it was downloaded. All File Transfer Protocol (FTP) and Gopher resources are reloaded.</summary>
        RESYNCHRONIZE = 0x200,
        /// <summary>Value that indicates hyperlinks are allowed.</summary>
        HYPERLINK = 0x400,
        /// <summary>Value that indicates that the bind operation should not display any user interfaces.</summary>
        NO_UI = 0x800,
        /// <summary>Value that indicates the bind operation should be completed silently. No user interface or user notification should occur.</summary>
        SILENTOPERATION = 0x1000,
        /// <summary>Value that indicates that the resource should not be stored in the Internet cache.</summary>
        PRAGMA_NO_CACHE = 0x2000,
        /// <summary>Value that indicates that the class object should be retrieved. Normally the class instance is retrieved.</summary>
        GETCLASSOBJECT = 0x4000,
        /// <summary>Reserved.</summary>
        RESERVED_1 = 0x8000,
        /// <summary>Reserved.</summary>
        FREE_THREADED = 0x10000,
        /// <summary>Value that indicates that the client application does not need to know the exact size of the data available, so the information is read directly from the source.</summary>
        DIRECT_READ = 0x20000,
        /// <summary>Value that indicates that this transaction should be handled as a forms submittal.</summary>
        FORMS_SUBMIT = 0x40000,
        /// <summary>Value that indicates the resource should be retrieved from the cache if the attempt to download the resource from the network fails.</summary>
        GETFROMCACHE_IF_NET_FAIL = 0x80000,
        /// <summary>Value that indicates the binding is from a URL moniker. This value was added for Microsoft┬о Internet Explorer 5.</summary>
        FROMURLMON = 0x100000,
        /// <summary>Value that indicates that the moniker should bind to the copy of the resource that is currently in the Internet cache. If the requested item is not found in the Internet cache, the system will attempt to locate the resource on the network. This value maps to the Microsoft Win32┬о Internet application programming interface (API) flag, INTERNET_FLAG_USE_CACHED_COPY.</summary>
        FWD_BACK = 0x200000,
        /// <summary>Urlmon.dll searches for temporary or permanent namespace handlers before it uses the default registered handler for particular protocols. This value changes this behavior by allowing the moniker client to specify that Urlmon.dll should look for and use the default system protocol first.</summary>
        PREFERDEFAULTHANDLER = 0x400000,
        /// <summary>Contains the flags that control the encoding of URLs.</summary>
        ENFORCERESTRICTED = 0x800000
    }
}
